<template>
	<view class="content">
		<view class="content_top">
			<image class="" src="../../static/images/massageChair_paymentSuccess_img.png" mode="widthFix"> </image>
			<view class="message1">支付成功</view>
			<view class="message3">正在为您启动机器，{{ count }} 秒后跳转...</view>
		</view>
		<view class="content_bottom">
			<view class="content_cell">
				<view class="content_cell_left">订单编号</view>
				<view class="content_cell_right">{{ orderNo }}</view>
			</view>
			<view class="content_cell">
				<view class="content_cell_left">购买套餐</view>
				<view class="content_cell_right">按摩{{ timelong }}分钟</view>
			</view>
			<view class="content_cell">
				<view class="content_cell_left">原价金额</view>
				<view class="content_cell_right">{{ origprice }}元</view>
			</view>
			<view class="content_cell">
				<view class="content_cell_left">实付金额</view>
				<view class="content_cell_right font_color">{{ currentprice }}元</view>
			</view>

		</view>

	</view>
</template>
<script>

export default {
	name: 'paymentSuccess',
	data() {
		return {
			count: 10,
			timelong: "",
			currentprice: "",
			origprice: "",
			origprice: "",
			orderNo: uni.getStorageSync("orderNo"),
		};
	},
	created() {
		let { timelong, currentprice, origprice } = this.$route.query;
		this.timelong = timelong;
		this.currentprice = currentprice;
		this.origprice = origprice;
		const startCountdown=setInterval(()=>{
			this.count--;
			if (this.count == 0) {

				this.count=10;
				clearTimeout(startCountdown);
				uni.navigateTo({
				url: `/pages/massageChair/usageTime?type=orderNo`,
			});
			}
		} ,1000);


	},
	methods: {



	}
};
</script>
<style lang="scss">
page {
	display: flex;
	justify-content: center;
	box-sizing: border-box;
	background-color: #fff;
	min-height: 100%;
	height: auto;
}

.content {
	width: 100%;
	padding: 1rpx 32rpx;

	.content_top {
		text-align: center;

		image {
			margin-top: 100rpx;
			width: 148rpx;
			height: 148rpx;
		}

		.message1 {
			margin-top: 34rpx;
			line-height: 68rpx;
			font-size: 48rpx;
			font-weight: 600;
			color: #1F2E49;

		}

		.message3 {
			margin-top: 16rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: #76839B;
		}

	}

	.content_bottom {
		margin-top: 80rpx;
		width: 100%;
		border-top: 2rpx solid #ECF0F5;
		padding-top: 48rpx;

		.content_cell {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 24rpx;

			.content_cell_left {
				font-size: 32rpx;
				color: #76839B;
			}

			.content_cell_right {
				font-size: 32rpx;
				color: #1F2E49;
			}

			.font_color {
				color: #FE6601;
			}

		}

	}
}
</style>
